/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.model.geom;

/**
 * 几何体类型
 * 
 * @author chunquedong
 * 
 */
public enum GeometryType {
	
	None (-1,"NONE"),
	Point (0,"POINT"),
	LineString (1, "LINESTRING"),
	Polygon (2, "POLYGON"),

	MultiPoint(0, "MULTIPOINT"),
	MultiLineString(1, "MULTILINESTRING"),
	MultiPolygon (2, "MULTIPOLYGON"),
	GeometryCollection (3, "GEOMETRYCOLLECTION");

	int dim;
	String name;
	
	GeometryType(int dim,String name){
		this.dim=dim;
		this.name=name;
	}
	
	public int dimension() {
		return dim;
	}
	
	public String toString(){
		return name;
	}
}